home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 596 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  982 b 

  1. Path: tasman.its.utas.edu.au!vmm
  2. From: vmm@tasman.its.utas.edu.au (Vishv Malhotra)
  3. Newsgroups: comp.std.c
  4. Subject: Paradox due to A7.1 Pointer generation rule
  5. Date: 18 Mar 1996 22:48:00 GMT
  6. Organization: University of Tasmania, Australia.
  7. Message-ID: <4ikp70$mkf@franklin.its.utas.edu.au>
  8. NNTP-Posting-Host: tasman.its.utas.edu.au
  9. X-Newsreader: NN version 6.5.0 #6 (NOV)
  10.  
  11.  
  12. In the following function a++; is acceptable but b++; is not.
  13.  
  14.     void foo(int a[20]) {
  15.         int b[20];
  16.  
  17.         a++;
  18.         b++;
  19.     }
  20.  
  21. I understand the reason, but I wish to know if there is any thought
  22. on elimination the anomaly?
  23.  
  24. Perhaps, I should state my problem more clearly, in K&R on page 115
  25. where command line arguments are being explained the diagram for argv
  26. corresponds to the declaration
  27.  
  28.     char *(*argv)[]
  29.  
  30. I have never seen such a declaration! Nor does this seem to work on
  31. my compiler. Is the diagram on page 115 not true representation of
  32. ANSI C standard?
  33.  
  34. Vishv
  35. --
  36.  
  37. Vishv Malhotra
  38. vmm@probitas.cs.utas.edu.au
  39.